import java.util.Scanner;


public class Finalboss extends MonsterBoss
{
	static int health = 320;
	static int str = 3;
	static int exp = 100;
	
	public static void expdrop()
	{
		Player.exp += Finalboss.exp;
	}

	public static void death()
	{
		System.out.println("The beast falls and the room starts shaking shakes only for the beast to collapses");
		expdrop();
	}
	
	public static void attackplayer()
	{
		System.out.println("The Massive beast slashes you!");
		Player.health -= Finalboss.str;
		Finalboss.health = 400;
	}
	
	public static void Finalfight()
	{
		do
		{
			@SuppressWarnings("resource")
			Scanner attack = new Scanner(System.in);
			Main.a = attack.nextInt();
					if(Main.x == 1)
					{
						PlayerBow.attackbow();
						if(Finalboss.health <= 0)
						{
							System.out.println("You Win!");
							Main.a = 0;
						}
						
						else if(Finalboss.health > 0)
						{
							Finalboss.attackplayer();
						}
						
						if(Player.exp >= 50)
						{
							Main.levelup();
						}
						
					    if(PlayerBow.health <= 0)
						{
							Main.Gameover();
							break;
						}
						
					}
					if(Main.x == 2)
					{
						PlayerSword.attacksword();
						if(Monster.health <= 0)
						{
							Finalboss.death();
							Main.a = 0;
						}
						
						else if(Finalboss.health > 0)
						{
							Finalboss.attackplayer();
						}
						
						if(Player.exp >= 50)
						{
							Main.levelup();
						}
						
					    if(PlayerBow.health <= 0)
						{
							break;
						}
					}
		}while(Main.a == 1);
	}
}
